Programming light sensors for robot

In summary, the speaker is building a robot and has finished the circuit work but is now struggling with programming. They are specifically having trouble making the robot turn quickly and are seeking advice on how to program the light sensors they have attached to the robot. They mention using a pic16f6690 chip and are learning C++ for programming. They also mention wanting to program the robot to follow a line or find a light source.
  • #1
DrDanger
44
0
Hey guys I'm building a robot and just finished all the circuit work, and am now working on programming it. I got all the basic movement functions down, but am having trouble with a few things. How do you make it turn..fast? i can make it turn but its horrible. Also i have two light sensors put on it given to me by a professor at our robotics club, but he left for India for a month so he cannot help me. I guess my question is how do you program the light sensors? and what are some things they are capable of doing? the chip we are using is a pic16f6690 i think. thanks for all the help!
 
Engineering news on Phys.org
  • #2
DrDanger said:
Hey guys I'm building a robot and just finished all the circuit work, and am now working on programming it. I got all the basic movement functions down, but am having trouble with a few things. How do you make it turn..fast? i can make it turn but its horrible. Also i have two light sensors put on it given to me by a professor at our robotics club, but he left for India for a month so he cannot help me. I guess my question is how do you program the light sensors? and what are some things they are capable of doing? the chip we are using is a pic16f6690 i think. thanks for all the help!

Cool. Post some pictures!

As for fast turning, do you have some sort of speed control on it? How does it turn (what are the wheel arrangements)?

The light sensors would normally be used along with a LED light source in retroflective mode, like to track a white line on the ground or something. Or to find a candle in a dark room or something.
 
  • #3
there are two wheels that have motors on them and then three little rolly type wheels in the front that move in any direction. for turning i simply stop one wheel and make the other go for a short amount of time then start them both going again..but obviously its not a "cool" looking turn and is slow. It is powered by 6 batteries ( 9 volts). I would like to make a program to follow a line then make another one later on to make it find a candle in a room or some other light source, but i know very little about programming. I am reading some c++ but haven't got very far. ill post pictures asap! thanks!
 
  • #4
Instead of stopping one wheel and running the other to turn, run the first wheel in reverse. Twice the turn rate, right? Have fun!
 

Related to Programming light sensors for robot

1. How do light sensors work for robots?

Light sensors for robots work by converting light energy into electrical signals. They consist of a photodiode, which detects light, and an amplifier, which converts the signal into a measurable voltage. This voltage is then used by the robot's control system to make decisions and perform actions.

2. What types of light sensors are commonly used in robotics?

The most commonly used light sensors in robotics are photodiodes, phototransistors, and photoresistors. These sensors vary in their sensitivity to different wavelengths of light and can be used for various purposes, such as detecting light levels, color, or motion.

3. How are light sensors programmed for robots?

Light sensors for robots can be programmed using a variety of languages, depending on the robot's hardware and software capabilities. Some commonly used languages for programming light sensors include C++, Python, and Java. The programming involves setting thresholds for the sensor's sensitivity and using the sensor's output to trigger certain actions or decisions.

4. What are the benefits of using light sensors in robotics?

Light sensors provide robots with the ability to detect and respond to changes in their environment, making them more adaptable and autonomous. They also allow robots to perform tasks that require precision and accuracy, such as following a specific path or avoiding obstacles.

5. Can light sensors be used for more than just detecting light in robotics?

Yes, light sensors can also be used for other purposes in robotics, such as measuring distance, detecting motion, or distinguishing between different colors. This makes them versatile and useful for a wide range of applications, from industrial robots to educational robotics kits.

Similar threads

  • Electrical Engineering
Replies
1
Views
943
Replies
8
Views
895
  • Electrical Engineering
Replies
6
Views
2K
  • Materials and Chemical Engineering
Replies
12
Views
607
  • STEM Academic Advising
Replies
7
Views
1K
Replies
2
Views
1K
  • Electrical Engineering
Replies
8
Views
2K
  • Electrical Engineering
Replies
24
Views
4K
Replies
3
Views
694
Replies
4
Views
2K
Back
Top